#include <REGX52.H>
#include "Delay.h"
unsigned char NixieTable[10] = {0x3F, 0x86, 0xDB, 0xCF, 0xE6, 0xED, 0xFD, 0x87, 0xFF, 0x6F};

void Nixie(unsigned char Location,unsigned char Num)
{
	switch(Location)
	{ 
		case 8:
			P2_4 = 0;
		  P2_3 = 0;
		  P2_2 = 0;
			break;
		case 7:
			P2_4 = 0;
		  P2_3 = 0;
		  P2_2 = 1;
			break;
		case 6:
			P2_4 = 0;
		  P2_3 = 1;
		  P2_2 = 0;
     	break;
		case 5:
			P2_4 = 0;
		  P2_3 = 1;
		  P2_2 = 1;
			break;
		case 4:
			P2_4 = 1;
		  P2_3 = 0;
		  P2_2 = 0;
			break;
		case 3:
			P2_4 = 1;
		  P2_3 = 0;
		  P2_2 = 1;
			break;
		case 2:
			P2_4 = 1;
		  P2_3 = 1;
		  P2_2 = 0;
			break;
		case 1:
			P2_4 = 1;
		  P2_3 = 1;
		  P2_2 = 1;
			break;
	}
		P0 = NixieTable[Num];
	  Delay(1);
	  P0 = 0x00;
}